﻿namespace Vampirewal.Core.WPF.Theme;

/// <summary>
/// Calendar.xaml 的交互逻辑
/// </summary>
public partial class Calendar : UserControl
{
    public Calendar()
    {
        InitializeComponent();
    }

    public DateTime CurrentDateTime { get; set; } = DateTime.Today;

    private void UserControl_Loaded(object sender, RoutedEventArgs e)
    {
        YearMonthTitle.Text = CurrentDateTime.ToString("yyyy年MM月");
    }

    private void ShangYiNianBtn_Click(object sender, RoutedEventArgs e)
    {
        CurrentDateTime = CurrentDateTime.AddYears(-1);
    }
}